/*
 * ExampleStrategy.cpp
 *
 *  Created on: 2010-01-13
 *      Author: adas
 */

#include "ExampleStrategy.h"

bool ExampleStrategy::runStrategy(Element & el_, int populationCount_, double weightFactor_, const std::vector<Element *> &population_,
				const std::vector<Bound> &bounds_, const Element &oldEl_)
{
	calculatePoint(el_, populationCount_, weightFactor_, population_);

	for(int i = 0; i < el_.getDimensionCount(); ++i)
	{
		if(el_.getValueAt(i) < bounds_[i].getMin() || el_.getValueAt(i) > bounds_[i].getMax())
			return false;
	}

	return true;
}
